package com.ruoyi.coupon.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.coupon.mapper.TbCouponTypeMapper;
import com.ruoyi.coupon.domain.TbCouponType;
import com.ruoyi.coupon.service.ITbCouponTypeService;

/**
 * 优惠卷类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-02
 */
@Service
public class TbCouponTypeServiceImpl implements ITbCouponTypeService 
{
    @Autowired
    private TbCouponTypeMapper tbCouponTypeMapper;

    /**
     * 查询优惠卷类型
     * 
     * @param id 优惠卷类型主键
     * @return 优惠卷类型
     */
    @Override
    public TbCouponType selectTbCouponTypeById(Long id)
    {
        return tbCouponTypeMapper.selectTbCouponTypeById(id);
    }

    /**
     * 查询优惠卷类型列表
     * 
     * @param tbCouponType 优惠卷类型
     * @return 优惠卷类型
     */
    @Override
    public List<TbCouponType> selectTbCouponTypeList(TbCouponType tbCouponType)
    {
        return tbCouponTypeMapper.selectTbCouponTypeList(tbCouponType);
    }

    /**
     * 新增优惠卷类型
     * 
     * @param tbCouponType 优惠卷类型
     * @return 结果
     */
    @Override
    public int insertTbCouponType(TbCouponType tbCouponType)
    {
        return tbCouponTypeMapper.insertTbCouponType(tbCouponType);
    }

    /**
     * 修改优惠卷类型
     * 
     * @param tbCouponType 优惠卷类型
     * @return 结果
     */
    @Override
    public int updateTbCouponType(TbCouponType tbCouponType)
    {
        return tbCouponTypeMapper.updateTbCouponType(tbCouponType);
    }

    /**
     * 批量删除优惠卷类型
     * 
     * @param ids 需要删除的优惠卷类型主键
     * @return 结果
     */
    @Override
    public int deleteTbCouponTypeByIds(Long[] ids)
    {
        return tbCouponTypeMapper.deleteTbCouponTypeByIds(ids);
    }

    /**
     * 删除优惠卷类型信息
     * 
     * @param id 优惠卷类型主键
     * @return 结果
     */
    @Override
    public int deleteTbCouponTypeById(Long id)
    {
        return tbCouponTypeMapper.deleteTbCouponTypeById(id);
    }
}
